package com.atguigu.serviceedu.client;

import com.atguigu.commonutils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@Component
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)//作为远程访问客户端添加
//告诉接口 熔断器是哪个
public interface VodClient {


    //删除视频
    //1.注解的访问url必须完整
    //参数注解的名字不能省略
    @DeleteMapping("/eduvod/video/deleteVideo/{videoId}")
    public R deleteVideo(@PathVariable(value = "videoId") String videoId);


    //批量删除视频
    @DeleteMapping("/eduvod/video/deleteVideoList")
    public R deleteVideoList(@RequestParam("videoIdList") List<String> videoIdList);


}
